<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Test :: Stove Tween</title>
<style>
.box
{
	position:absolute;
	width: 50px;
	height: 50px;
	top: 10px;
	left: 10px;
	background-color: #f00;
}
</style>
	<script src="./js/importlibs.js"></script>
    <script type="text/javascript">
		window.onload = function()
		{
			
			var _box;
			var _option;
			
			for( var i=0; i<100; i++ )
			{
				_box = document.createElement( "div" );
				_box.className	= "box";
				_box.style.left = Math.random()*1024+"px";
				_box.style.top = Math.random()*768+"px";
				document.body.appendChild( _box );
				
				_option			= new STTweenOption();
				_option.left	= Math.random()*1024;
				_option.top		= Math.random()*768;
				_option.onComplete = onComplete;
			
				// 자동
				STTween.to( _box, 1, _option );
				
				//TweenMax.to( _box, 1, { css:{left:Math.random()*1024+"px", top:Math.random()*768+"px"}, ease:Circ.easeOut } );
				
			}
			
			function onComplete()
			{
				STICKER.log( "onComplete!!!" );
			}
			
			// 수동
			/*
			var _tween = new STTween( _box, 1, _option );
			_tween.start();
			for( var i=0; i<20; i++ ){
				_tween.update();
			}
			_tween.finish( true );
			*/
		}
	</script>
</head>

<body>
</body>
</html>
